import request from '@/utils/request'
export const getPageRole = data => request('/sys/role', { params: data })
export const addRole = data => request.post('/sys/role', data)
export const delRole = id => request.delete(`/sys/role/${id}`)
export const editRole = data => request.put(`/sys/role/${data.id}`, data)
export const enabledRole = () => request.get('/sys/role/list/enabled')
export const getRoleDetail = (id) => request.get(`/sys/role/${id}`)
export const updateRolePro = data => request.put(`/sys/role/assignPrem`, data)
